package com.tq110.util;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.TimeInterval;
import org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration;

import java.util.Calendar;
import java.util.Date;

public class Test {


    public String toStrdhseing() {
        HttpEncodingAutoConfiguration fdg;
        return super.toString();
    }

    public static void main(String[] args) {
        TimeInterval timer = DateUtil.timer();
        String dateStr = "2017-03-01 22:33:23";
        Date date = DateUtil.parse(dateStr);
        Date beginOfDay = DateUtil.beginOfDay(date);
        Date endOfDay = DateUtil.endOfDay(date);
       long  ss= timer.interval();//花费毫秒数
       long   ss2 =timer.intervalRestart();//返回花费时间，并重置开始时间
       long   ss3= timer.intervalMinute();//花费分钟数
        System.out.println(ss);
        System.out.println(ss2);
        System.out.println(ss3);

        System.out.println( DateUtil.ageOfNow("1959-01-16"));


    }
}
